import axios from "axios";
export const getListAPI = (params) => {
  return axios.get("http://localhost:3001/data", { params });
};
export const confirmAPI = (data) => {
  return axios.post("http://localhost:3001/data", data);
};
export const editFormAPI = (id) => {
  return axios.get(`http://localhost:3001/data/${id}`);
};
export const eidtConfirmAPI = (data) => {
  return axios.put(`http://localhost:3001/data/${data.id}`, data);
};
export const delTaskAPI = (id) => {
  return axios.delete(`http://localhost:3001/data/${id}`);
};
export const searchTaskAPI = (name) => {
  return axios.get(`http://localhost:3001/data/?name=${name}`);
};
